CREATE TABLE [dbo].[TRRENO_CAJA]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[CO_UNID_CONC] [dbo].[TD_VC_003] NOT NULL,
[CO_CLIE] [dbo].[TD_VC_020] NOT NULL,
[NU_RENO] [dbo].[TD_VC_008] NOT NULL,
[FE_RENO] [dbo].[TD_DT_001] NOT NULL,
[NU_SECU] [dbo].[TD_IN_001] NOT NULL CONSTRAINT [DF__TRRENO_CA__NU_SE__70499252] DEFAULT ((0)),
[FA_TIPO_CAMB] [dbo].[TD_NU_015_006] NOT NULL,
[CO_TIOP_RENO] [dbo].[TD_VC_003] NOT NULL,
[CO_CAJA] [dbo].[TD_VC_008] NOT NULL,
[AA_CAJA] [dbo].[TD_VC_004] NOT NULL,
[MM_CAJA] [dbo].[TD_VC_002] NOT NULL,
[NU_COMP_CAJA] [dbo].[TD_VC_008] NOT NULL,
[CO_TIPO_DOCU] [dbo].[TD_VC_003] NOT NULL,
[NU_DOCU_CLIE] [dbo].[TD_VC_020] NOT NULL,
[CO_TIOP_CAJA] [dbo].[TD_VC_003] NOT NULL,
[TI_SITU] [dbo].[TD_VC_003] NULL,
[NU_ASTO_ANUL] [dbo].[TD_VC_010] NULL,
[FE_ANUL] [dbo].[TD_DT_001] NULL,
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TRRENO_CA__CO_US__713DB68B] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TRRENO_CA__FE_US__7231DAC4] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TRRENO_CA__CO_US__7325FEFD] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TRRENO_CA__FE_US__741A2336] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TRRENO_CAJA] ADD CONSTRAINT [PK__TRRENO_C__FF2DB03E17394241] PRIMARY KEY CLUSTERED  ([CO_EMPR], [CO_UNID_CONC], [CO_CLIE], [NU_RENO], [FE_RENO], [NU_SECU]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TRRENO_CAJA] ADD CONSTRAINT [FK__TRRENO_CA__CO_EM__21D6CC45] FOREIGN KEY ([CO_EMPR]) REFERENCES [dbo].[TMPARA_TESO] ([CO_EMPR])
GO
